#include <iostream>
#include <vector>

using namespace std;

bool search(vector<int>::iterator beg, vector<int>::iterator end, int val){
    while(beg!=end){
        if(*beg==val) return true;
        beg++;
    }

    return false;
}

int main(){
    vector<int> nums{0,1,2,3};

    bool ret=search(nums.begin(), nums.end(), 4);
    cout<<ret;
    return 0;
}